{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already satisfied: bokeh in c:\\users\\86185\\anaconda3\\lib\\site-packages (2.1.1)\n",
      "Requirement already satisfied: numpy>=1.11.3 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from bokeh) (1.18.5)\n",
      "Requirement already satisfied: packaging>=16.8 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from bokeh) (20.4)\n",
      "Requirement already satisfied: PyYAML>=3.10 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from bokeh) (5.3.1)\n",
      "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from bokeh) (2.8.1)\n",
      "Requirement already satisfied: pillow>=4.0 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from bokeh) (7.2.0)\n",
      "Requirement already satisfied: tornado>=5.1 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from bokeh) (6.0.4)\n",
      "Requirement already satisfied: Jinja2>=2.7 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from bokeh) (2.11.2)\n",
      "Requirement already satisfied: typing-extensions>=3.7.4 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from bokeh) (3.7.4.2)\n",
      "Requirement already satisfied: MarkupSafe>=0.23 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from Jinja2>=2.7->bokeh) (1.1.1)\n",
      "Requirement already satisfied: six in c:\\users\\86185\\anaconda3\\lib\\site-packages (from packaging>=16.8->bokeh) (1.15.0)\n",
      "Requirement already satisfied: pyparsing>=2.0.2 in c:\\users\\86185\\anaconda3\\lib\\site-packages (from packaging>=16.8->bokeh) (2.4.7)\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install bokeh"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <a href=\"https://bokeh.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"29927\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = true;\n",
       "\n",
       "  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  var JS_MIME_TYPE = 'application/javascript';\n",
       "  var HTML_MIME_TYPE = 'text/html';\n",
       "  var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
       "  var CLASS_NAME = 'output_bokeh rendered_html';\n",
       "\n",
       "  /**\n",
       "   * Render data to the DOM node\n",
       "   */\n",
       "  function render(props, node) {\n",
       "    var script = document.createElement(\"script\");\n",
       "    node.appendChild(script);\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when an output is cleared or removed\n",
       "   */\n",
       "  function handleClearOutput(event, handle) {\n",
       "    var cell = handle.cell;\n",
       "\n",
       "    var id = cell.output_area._bokeh_element_id;\n",
       "    var server_id = cell.output_area._bokeh_server_id;\n",
       "    // Clean up Bokeh references\n",
       "    if (id != null && id in Bokeh.index) {\n",
       "      Bokeh.index[id].model.document.clear();\n",
       "      delete Bokeh.index[id];\n",
       "    }\n",
       "\n",
       "    if (server_id !== undefined) {\n",
       "      // Clean up Bokeh references\n",
       "      var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
       "      cell.notebook.kernel.execute(cmd, {\n",
       "        iopub: {\n",
       "          output: function(msg) {\n",
       "            var id = msg.content.text.trim();\n",
       "            if (id in Bokeh.index) {\n",
       "              Bokeh.index[id].model.document.clear();\n",
       "              delete Bokeh.index[id];\n",
       "            }\n",
       "          }\n",
       "        }\n",
       "      });\n",
       "      // Destroy server and session\n",
       "      var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
       "      cell.notebook.kernel.execute(cmd);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when a new output is added\n",
       "   */\n",
       "  function handleAddOutput(event, handle) {\n",
       "    var output_area = handle.output_area;\n",
       "    var output = handle.output;\n",
       "\n",
       "    // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
       "    if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
       "      return\n",
       "    }\n",
       "\n",
       "    var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
       "\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
       "      toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
       "      // store reference to embed id on output_area\n",
       "      output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
       "    }\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
       "      var bk_div = document.createElement(\"div\");\n",
       "      bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
       "      var script_attrs = bk_div.children[0].attributes;\n",
       "      for (var i = 0; i < script_attrs.length; i++) {\n",
       "        toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
       "        toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n",
       "      }\n",
       "      // store reference to server id on output_area\n",
       "      output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
       "    }\n",
       "  }\n",
       "\n",
       "  function register_renderer(events, OutputArea) {\n",
       "\n",
       "    function append_mime(data, metadata, element) {\n",
       "      // create a DOM node to render to\n",
       "      var toinsert = this.create_output_subarea(\n",
       "        metadata,\n",
       "        CLASS_NAME,\n",
       "        EXEC_MIME_TYPE\n",
       "      );\n",
       "      this.keyboard_manager.register_events(toinsert);\n",
       "      // Render to node\n",
       "      var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
       "      render(props, toinsert[toinsert.length - 1]);\n",
       "      element.append(toinsert);\n",
       "      return toinsert\n",
       "    }\n",
       "\n",
       "    /* Handle when an output is cleared or removed */\n",
       "    events.on('clear_output.CodeCell', handleClearOutput);\n",
       "    events.on('delete.Cell', handleClearOutput);\n",
       "\n",
       "    /* Handle when a new output is added */\n",
       "    events.on('output_added.OutputArea', handleAddOutput);\n",
       "\n",
       "    /**\n",
       "     * Register the mime type and append_mime function with output_area\n",
       "     */\n",
       "    OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
       "      /* Is output safe? */\n",
       "      safe: true,\n",
       "      /* Index of renderer in `output_area.display_order` */\n",
       "      index: 0\n",
       "    });\n",
       "  }\n",
       "\n",
       "  // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
       "  if (root.Jupyter !== undefined) {\n",
       "    var events = require('base/js/events');\n",
       "    var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
       "\n",
       "    if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
       "      register_renderer(events, OutputArea);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    var el = document.getElementById(\"29927\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) {\n",
       "        if (callback != null)\n",
       "          callback();\n",
       "      });\n",
       "    } finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.debug(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(css_urls, js_urls, callback) {\n",
       "    if (css_urls == null) css_urls = [];\n",
       "    if (js_urls == null) js_urls = [];\n",
       "\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = css_urls.length + js_urls.length;\n",
       "\n",
       "    function on_load() {\n",
       "      root._bokeh_is_loading--;\n",
       "      if (root._bokeh_is_loading === 0) {\n",
       "        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
       "        run_callbacks()\n",
       "      }\n",
       "    }\n",
       "\n",
       "    function on_error() {\n",
       "      console.error(\"failed to load \" + url);\n",
       "    }\n",
       "\n",
       "    for (var i = 0; i < css_urls.length; i++) {\n",
       "      var url = css_urls[i];\n",
       "      const element = document.createElement(\"link\");\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.rel = \"stylesheet\";\n",
       "      element.type = \"text/css\";\n",
       "      element.href = url;\n",
       "      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
       "      document.body.appendChild(element);\n",
       "    }\n",
       "\n",
       "    const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.1.1.min.js\": \"kLr4fYcqcSpbuI95brIH3vnnYCquzzSxHPU6XGQCIkQRGJwhg0StNbj1eegrHs12\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.1.1.min.js\": \"xIGPmVtaOm+z0BqfSOMn4lOR6ciex448GIKG4eE61LsAvmGj48XcMQZtKcE/UXZe\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.1.1.min.js\": \"Dc9u1wF/0zApGIWoBbH77iWEHtdmkuYWG839Uzmv8y8yBLXebjO9ZnERsde5Ln/P\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js\": \"cT9JaBz7GiRXdENrJLZNSC6eMNF3nh3fa5fTF51Svp+ukxPdwcU5kGXGPBgDCa2j\"};\n",
       "\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var element = document.createElement('script');\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.async = false;\n",
       "      element.src = url;\n",
       "      if (url in hashes) {\n",
       "        element.crossOrigin = \"anonymous\";\n",
       "        element.integrity = \"sha384-\" + hashes[url];\n",
       "      }\n",
       "      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.head.appendChild(element);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  function inject_raw_css(css) {\n",
       "    const element = document.createElement(\"style\");\n",
       "    element.appendChild(document.createTextNode(css));\n",
       "    document.body.appendChild(element);\n",
       "  }\n",
       "\n",
       "  \n",
       "  var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js\"];\n",
       "  var css_urls = [];\n",
       "  \n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "    \n",
       "    \n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if (root.Bokeh !== undefined || force === true) {\n",
       "      \n",
       "    for (var i = 0; i < inline_js.length; i++) {\n",
       "      inline_js[i].call(root, root.Bokeh);\n",
       "    }\n",
       "    if (force === true) {\n",
       "        display_loaded();\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"29927\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(css_urls, js_urls, function() {\n",
       "      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));"
      ],
      "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n  function now() {\n    return new Date();\n  }\n\n  var force = true;\n\n  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n    root._bokeh_onload_callbacks = [];\n    root._bokeh_is_loading = undefined;\n  }\n\n  \n\n  \n  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n    root._bokeh_timeout = Date.now() + 5000;\n    root._bokeh_failed_load = false;\n  }\n\n  var NB_LOAD_WARNING = {'data': {'text/html':\n     \"<div style='background-color: #fdd'>\\n\"+\n     \"<p>\\n\"+\n     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n     \"</p>\\n\"+\n     \"<ul>\\n\"+\n     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n     \"</ul>\\n\"+\n     \"<code>\\n\"+\n     \"from bokeh.resources import INLINE\\n\"+\n     \"output_notebook(resources=INLINE)\\n\"+\n     \"</code>\\n\"+\n     \"</div>\"}};\n\n  function display_loaded() {\n    var el = document.getElementById(\"29927\");\n    if (el != null) {\n      el.textContent = \"BokehJS is loading...\";\n    }\n    if (root.Bokeh !== undefined) {\n      if (el != null) {\n        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n      }\n    } else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(display_loaded, 100)\n    }\n  }\n\n\n  function run_callbacks() {\n    try {\n      root._bokeh_onload_callbacks.forEach(function(callback) {\n        if (callback != null)\n          callback();\n      });\n    } finally {\n      delete root._bokeh_onload_callbacks\n    }\n    console.debug(\"Bokeh: all callbacks have finished\");\n  }\n\n  function load_libs(css_urls, js_urls, callback) {\n    if (css_urls == null) css_urls = [];\n    if (js_urls == null) js_urls = [];\n\n    root._bokeh_onload_callbacks.push(callback);\n    if (root._bokeh_is_loading > 0) {\n      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n      return null;\n    }\n    if (js_urls == null || js_urls.length === 0) {\n      run_callbacks();\n      return null;\n    }\n    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n    root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n    function on_load() {\n      root._bokeh_is_loading--;\n      if (root._bokeh_is_loading === 0) {\n        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n        run_callbacks()\n      }\n    }\n\n    function on_error() {\n      console.error(\"failed to load \" + url);\n    }\n\n    for (var i = 0; i < css_urls.length; i++) {\n      var url = css_urls[i];\n      const element = document.createElement(\"link\");\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.rel = \"stylesheet\";\n      element.type = \"text/css\";\n      element.href = url;\n      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n      document.body.appendChild(element);\n    }\n\n    const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.1.1.min.js\": \"kLr4fYcqcSpbuI95brIH3vnnYCquzzSxHPU6XGQCIkQRGJwhg0StNbj1eegrHs12\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.1.1.min.js\": \"xIGPmVtaOm+z0BqfSOMn4lOR6ciex448GIKG4eE61LsAvmGj48XcMQZtKcE/UXZe\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.1.1.min.js\": \"Dc9u1wF/0zApGIWoBbH77iWEHtdmkuYWG839Uzmv8y8yBLXebjO9ZnERsde5Ln/P\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js\": \"cT9JaBz7GiRXdENrJLZNSC6eMNF3nh3fa5fTF51Svp+ukxPdwcU5kGXGPBgDCa2j\"};\n\n    for (var i = 0; i < js_urls.length; i++) {\n      var url = js_urls[i];\n      var element = document.createElement('script');\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.async = false;\n      element.src = url;\n      if (url in hashes) {\n        element.crossOrigin = \"anonymous\";\n        element.integrity = \"sha384-\" + hashes[url];\n      }\n      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      document.head.appendChild(element);\n    }\n  };\n\n  function inject_raw_css(css) {\n    const element = document.createElement(\"style\");\n    element.appendChild(document.createTextNode(css));\n    document.body.appendChild(element);\n  }\n\n  \n  var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js\"];\n  var css_urls = [];\n  \n\n  var inline_js = [\n    function(Bokeh) {\n      Bokeh.set_log_level(\"info\");\n    },\n    function(Bokeh) {\n    \n    \n    }\n  ];\n\n  function run_inline_js() {\n    \n    if (root.Bokeh !== undefined || force === true) {\n      \n    for (var i = 0; i < inline_js.length; i++) {\n      inline_js[i].call(root, root.Bokeh);\n    }\n    if (force === true) {\n        display_loaded();\n      }} else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(run_inline_js, 100);\n    } else if (!root._bokeh_failed_load) {\n      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n      root._bokeh_failed_load = true;\n    } else if (force !== true) {\n      var cell = $(document.getElementById(\"29927\")).parents('.cell').data().cell;\n      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n    }\n\n  }\n\n  if (root._bokeh_is_loading === 0) {\n    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n    run_inline_js();\n  } else {\n    load_libs(css_urls, js_urls, function() {\n      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n      run_inline_js();\n    });\n  }\n}(window));"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.plotting import figure, output_notebook, show\n",
    "import numpy as np\n",
    "output_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "## 设置数据\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [6, 8, 2, 4, 5]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"3946fb33-59ac-4705-91a0-6722970547f1\" data-root-id=\"1002\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"03ae0c93-f8d9-49e9-bf42-6c640c00b1f5\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1011\"}],\"center\":[{\"id\":\"1014\"},{\"id\":\"1018\"}],\"left\":[{\"id\":\"1015\"}],\"plot_height\":400,\"plot_width\":400,\"renderers\":[{\"id\":\"1036\"}],\"title\":{\"id\":\"1039\"},\"toolbar\":{\"id\":\"1026\"},\"x_range\":{\"id\":\"1003\"},\"x_scale\":{\"id\":\"1007\"},\"y_range\":{\"id\":\"1005\"},\"y_scale\":{\"id\":\"1009\"}},\"id\":\"1002\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"1015\"},\"dimension\":1,\"ticker\":null},\"id\":\"1018\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1025\"}},\"id\":\"1021\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"data_source\":{\"id\":\"1033\"},\"glyph\":{\"id\":\"1034\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1035\"},\"selection_glyph\":null,\"view\":{\"id\":\"1037\"}},\"id\":\"1036\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1019\",\"type\":\"PanTool\"},{\"attributes\":{\"axis\":{\"id\":\"1011\"},\"ticker\":null},\"id\":\"1014\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1042\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1020\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1022\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1005\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1023\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1033\"}},\"id\":\"1037\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1009\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1044\",\"type\":\"Selection\"},{\"attributes\":{\"formatter\":{\"id\":\"1042\"},\"ticker\":{\"id\":\"1016\"}},\"id\":\"1015\",\"type\":\"LinearAxis\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1025\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1034\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1045\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"HelpTool\"},{\"attributes\":{\"text\":\"\"},\"id\":\"1039\",\"type\":\"Title\"},{\"attributes\":{\"formatter\":{\"id\":\"1040\"},\"ticker\":{\"id\":\"1012\"}},\"id\":\"1011\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1003\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1007\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,8,2,4,5]},\"selected\":{\"id\":\"1044\"},\"selection_policy\":{\"id\":\"1045\"}},\"id\":\"1033\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1019\"},{\"id\":\"1020\"},{\"id\":\"1021\"},{\"id\":\"1022\"},{\"id\":\"1023\"},{\"id\":\"1024\"}]},\"id\":\"1026\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1016\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1035\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1012\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1040\",\"type\":\"BasicTickFormatter\"}],\"root_ids\":[\"1002\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"03ae0c93-f8d9-49e9-bf42-6c640c00b1f5\",\"root_ids\":[\"1002\"],\"roots\":{\"1002\":\"3946fb33-59ac-4705-91a0-6722970547f1\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "1002"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "p = figure(plot_width = 400, plot_height = 400)\n",
    "p.circle(x, y, size = 20, color = \"navy\", alpha = 0.5)\n",
    "\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"display: table;\"><div style=\"display: table-row;\"><div style=\"display: table-cell;\"><b title=\"bokeh.plotting.figure.Figure\">Figure</b>(</div><div style=\"display: table-cell;\">id&nbsp;=&nbsp;'1002', <span id=\"1102\" style=\"cursor: pointer;\">&hellip;)</span></div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">above&nbsp;=&nbsp;[],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">align&nbsp;=&nbsp;'start',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">aspect_ratio&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">aspect_scale&nbsp;=&nbsp;1,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">background&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">background_fill_alpha&nbsp;=&nbsp;1.0,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">background_fill_color&nbsp;=&nbsp;'#ffffff',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">below&nbsp;=&nbsp;[LinearAxis(id='1011', ...)],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">border_fill_alpha&nbsp;=&nbsp;1.0,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">border_fill_color&nbsp;=&nbsp;'#ffffff',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">center&nbsp;=&nbsp;[Grid(id='1014', ...), Grid(id='1018', ...)],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">css_classes&nbsp;=&nbsp;[],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">disabled&nbsp;=&nbsp;False,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">extra_x_ranges&nbsp;=&nbsp;{},</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">extra_y_ranges&nbsp;=&nbsp;{},</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">frame_height&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">frame_width&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">height&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">height_policy&nbsp;=&nbsp;'auto',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">hidpi&nbsp;=&nbsp;True,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">js_event_callbacks&nbsp;=&nbsp;{},</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">js_property_callbacks&nbsp;=&nbsp;{},</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">left&nbsp;=&nbsp;[LinearAxis(id='1015', ...)],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">lod_factor&nbsp;=&nbsp;10,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">lod_interval&nbsp;=&nbsp;300,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">lod_threshold&nbsp;=&nbsp;2000,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">lod_timeout&nbsp;=&nbsp;500,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">margin&nbsp;=&nbsp;(0, 0, 0, 0),</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">match_aspect&nbsp;=&nbsp;False,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">max_height&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">max_width&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">min_border&nbsp;=&nbsp;5,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">min_border_bottom&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">min_border_left&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">min_border_right&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">min_border_top&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">min_height&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">min_width&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">name&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">outline_line_alpha&nbsp;=&nbsp;1.0,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">outline_line_cap&nbsp;=&nbsp;'butt',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">outline_line_color&nbsp;=&nbsp;'#e5e5e5',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">outline_line_dash&nbsp;=&nbsp;[],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">outline_line_dash_offset&nbsp;=&nbsp;0,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">outline_line_join&nbsp;=&nbsp;'bevel',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">outline_line_width&nbsp;=&nbsp;1,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">output_backend&nbsp;=&nbsp;'canvas',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">plot_height&nbsp;=&nbsp;400,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">plot_width&nbsp;=&nbsp;400,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">renderers&nbsp;=&nbsp;[GlyphRenderer(id='1036', ...)],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">reset_policy&nbsp;=&nbsp;'standard',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">right&nbsp;=&nbsp;[],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">sizing_mode&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">subscribed_events&nbsp;=&nbsp;[],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">tags&nbsp;=&nbsp;[],</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">title&nbsp;=&nbsp;Title(id='1039', ...),</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">title_location&nbsp;=&nbsp;'above',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">toolbar&nbsp;=&nbsp;Toolbar(id='1026', ...),</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">toolbar_location&nbsp;=&nbsp;'right',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">toolbar_sticky&nbsp;=&nbsp;True,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">visible&nbsp;=&nbsp;True,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">width&nbsp;=&nbsp;None,</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">width_policy&nbsp;=&nbsp;'auto',</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">x_range&nbsp;=&nbsp;DataRange1d(id='1003', ...),</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">x_scale&nbsp;=&nbsp;LinearScale(id='1007', ...),</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">y_range&nbsp;=&nbsp;DataRange1d(id='1005', ...),</div></div><div class=\"1101\" style=\"display: none;\"><div style=\"display: table-cell;\"></div><div style=\"display: table-cell;\">y_scale&nbsp;=&nbsp;LinearScale(id='1009', ...))</div></div></div>\n",
       "<script>\n",
       "(function() {\n",
       "  var expanded = false;\n",
       "  var ellipsis = document.getElementById(\"1102\");\n",
       "  ellipsis.addEventListener(\"click\", function() {\n",
       "    var rows = document.getElementsByClassName(\"1101\");\n",
       "    for (var i = 0; i < rows.length; i++) {\n",
       "      var el = rows[i];\n",
       "      el.style.display = expanded ? \"none\" : \"table-row\";\n",
       "    }\n",
       "    ellipsis.innerHTML = expanded ? \"&hellip;)\" : \"&lsaquo;&lsaquo;&lsaquo;\";\n",
       "    expanded = !expanded;\n",
       "  });\n",
       "})();\n",
       "</script>\n"
      ],
      "text/plain": [
       "Figure(id='1002', ...)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"4300e94a-f126-4c00-9311-8d3753fec1cd\" data-root-id=\"1002\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"10ca2878-9613-491a-9ffe-18d4803428ab\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1011\"}],\"center\":[{\"id\":\"1014\"},{\"id\":\"1018\"}],\"left\":[{\"id\":\"1015\"}],\"margin\":[0,0,0,0],\"plot_height\":400,\"plot_width\":400,\"renderers\":[{\"id\":\"1036\"}],\"title\":{\"id\":\"1039\"},\"toolbar\":{\"id\":\"1026\"},\"x_range\":{\"id\":\"1003\"},\"x_scale\":{\"id\":\"1007\"},\"y_range\":{\"id\":\"1005\"},\"y_scale\":{\"id\":\"1009\"}},\"id\":\"1002\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"1015\"},\"dimension\":1,\"ticker\":null},\"id\":\"1018\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1025\"}},\"id\":\"1021\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"data_source\":{\"id\":\"1033\"},\"glyph\":{\"id\":\"1034\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1035\"},\"selection_glyph\":null,\"view\":{\"id\":\"1037\"}},\"id\":\"1036\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1019\",\"type\":\"PanTool\"},{\"attributes\":{\"axis\":{\"id\":\"1011\"},\"ticker\":null},\"id\":\"1014\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1042\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1020\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1022\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1005\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1023\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1033\"}},\"id\":\"1037\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1009\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1044\",\"type\":\"Selection\"},{\"attributes\":{\"formatter\":{\"id\":\"1042\"},\"ticker\":{\"id\":\"1016\"}},\"id\":\"1015\",\"type\":\"LinearAxis\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1025\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1034\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1045\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"HelpTool\"},{\"attributes\":{\"text\":\"\"},\"id\":\"1039\",\"type\":\"Title\"},{\"attributes\":{\"formatter\":{\"id\":\"1040\"},\"ticker\":{\"id\":\"1012\"}},\"id\":\"1011\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1003\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1007\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,8,2,4,5]},\"selected\":{\"id\":\"1044\"},\"selection_policy\":{\"id\":\"1045\"}},\"id\":\"1033\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1019\"},{\"id\":\"1020\"},{\"id\":\"1021\"},{\"id\":\"1022\"},{\"id\":\"1023\"},{\"id\":\"1024\"}]},\"id\":\"1026\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1016\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1035\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1012\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1040\",\"type\":\"BasicTickFormatter\"}],\"root_ids\":[\"1002\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"10ca2878-9613-491a-9ffe-18d4803428ab\",\"root_ids\":[\"1002\"],\"roots\":{\"1002\":\"4300e94a-f126-4c00-9311-8d3753fec1cd\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "1002"
      }
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "None"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(show(p))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on Column in module bokeh.models.layouts object:\n",
      "\n",
      "class Column(Box)\n",
      " |  Column(*args, **kwargs)\n",
      " |  \n",
      " |  Lay out child components in a single vertical row.\n",
      " |  \n",
      " |  Children can be specified as positional arguments, as a single argument\n",
      " |  that is a sequence, or using the ``children`` keyword argument.\n",
      " |  \n",
      " |  Method resolution order:\n",
      " |      Column\n",
      " |      Box\n",
      " |      LayoutDOM\n",
      " |      bokeh.model.Model\n",
      " |      bokeh.core.has_props.HasProps\n",
      " |      bokeh.util.callback_manager.PropertyCallbackManager\n",
      " |      bokeh.util.callback_manager.EventCallbackManager\n",
      " |      builtins.object\n",
      " |  \n",
      " |  Data descriptors defined here:\n",
      " |  \n",
      " |  rows\n",
      " |      Describes how the component should maintain its rows' heights.\n",
      " |      \n",
      " |      .. note::\n",
      " |          This is an experimental feature and may change in future. Use it at your\n",
      " |          own discretion.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes defined here:\n",
      " |  \n",
      " |  __cached_all__overridden_defaults__ = {}\n",
      " |  \n",
      " |  __cached_all__properties__ = {'align', 'aspect_ratio', 'background', '...\n",
      " |  \n",
      " |  __cached_all__properties_with_refs__ = {'children', 'js_event_callback...\n",
      " |  \n",
      " |  __container_props__ = set()\n",
      " |  \n",
      " |  __properties__ = {'rows'}\n",
      " |  \n",
      " |  __properties_with_refs__ = set()\n",
      " |  \n",
      " |  __qualified_model__ = 'Column'\n",
      " |  \n",
      " |  __view_model__ = 'Column'\n",
      " |  \n",
      " |  __view_module__ = 'bokeh.models.layouts'\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from Box:\n",
      " |  \n",
      " |  __init__(self, *args, **kwargs)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors inherited from Box:\n",
      " |  \n",
      " |  children\n",
      " |      The list of children, which can be other components including plots, rows, columns, and widgets.\n",
      " |  \n",
      " |  spacing\n",
      " |      The gap between children (in pixels).\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors inherited from LayoutDOM:\n",
      " |  \n",
      " |  align\n",
      " |      The alignment point within the parent container.\n",
      " |      \n",
      " |      This property is useful only if this component is a child element of a layout\n",
      " |      (e.g. a grid). Self alignment can be overridden by the parent container (e.g.\n",
      " |      grid track align).\n",
      " |  \n",
      " |  aspect_ratio\n",
      " |      Describes the proportional relationship between component's width and height.\n",
      " |      \n",
      " |      This works if any of component's dimensions are flexible in size. If set to\n",
      " |      a number, ``width / height = aspect_ratio`` relationship will be maintained.\n",
      " |      Otherwise, if set to ``\"auto\"``, component's preferred width and height will\n",
      " |      be used to determine the aspect (if not set, no aspect will be preserved).\n",
      " |  \n",
      " |  background\n",
      " |      Background color of the component.\n",
      " |  \n",
      " |  css_classes\n",
      " |      A list of CSS class names to add to this DOM element. Note: the class names are\n",
      " |      simply added as-is, no other guarantees are provided.\n",
      " |      \n",
      " |      It is also permissible to assign from tuples, however these are adapted -- the\n",
      " |      property will always contain a list.\n",
      " |  \n",
      " |  disabled\n",
      " |      Whether the widget will be disabled when rendered.\n",
      " |      \n",
      " |      If ``True``, the widget will be greyed-out and not responsive to UI events.\n",
      " |  \n",
      " |  height\n",
      " |      The height of the component (in pixels).\n",
      " |      \n",
      " |      This can be either fixed or preferred height, depending on height sizing policy.\n",
      " |  \n",
      " |  height_policy\n",
      " |      Describes how the component should maintain its height.\n",
      " |      \n",
      " |      ``\"auto\"``\n",
      " |          Use component's preferred sizing policy.\n",
      " |      \n",
      " |      ``\"fixed\"``\n",
      " |          Use exactly ``height`` pixels. Component will overflow if it can't fit in the\n",
      " |          available vertical space.\n",
      " |      \n",
      " |      ``\"fit\"``\n",
      " |          Use component's preferred height (if set) and allow to fit into the available\n",
      " |          vertical space within the minimum and maximum height bounds (if set). Component's\n",
      " |          height neither will be aggressively minimized nor maximized.\n",
      " |      \n",
      " |      ``\"min\"``\n",
      " |          Use as little vertical space as possible, not less than the minimum height (if set).\n",
      " |          The starting point is the preferred height (if set). The height of the component may\n",
      " |          shrink or grow depending on the parent layout, aspect management and other factors.\n",
      " |      \n",
      " |      ``\"max\"``\n",
      " |          Use as much vertical space as possible, not more than the maximum height (if set).\n",
      " |          The starting point is the preferred height (if set). The height of the component may\n",
      " |          shrink or grow depending on the parent layout, aspect management and other factors.\n",
      " |      \n",
      " |      .. note::\n",
      " |          This is an experimental feature and may change in future. Use it at your\n",
      " |          own discretion. Prefer using ``sizing_mode`` if this level of control isn't\n",
      " |          strictly necessary.\n",
      " |  \n",
      " |  margin\n",
      " |      Allows to create additional space around the component.\n",
      " |      The values in the tuple are ordered as follows - Margin-Top, Margin-Right, Margin-Bottom and Margin-Left,\n",
      " |      similar to CSS standards.\n",
      " |      Negative margin values may be used to shrink the space from any direction.\n",
      " |  \n",
      " |  max_height\n",
      " |      Minimal height of the component (in pixels) if height is adjustable.\n",
      " |  \n",
      " |  max_width\n",
      " |      Minimal width of the component (in pixels) if width is adjustable.\n",
      " |  \n",
      " |  min_height\n",
      " |      Minimal height of the component (in pixels) if height is adjustable.\n",
      " |  \n",
      " |  min_width\n",
      " |      Minimal width of the component (in pixels) if width is adjustable.\n",
      " |  \n",
      " |  sizing_mode\n",
      " |      How the component should size itself.\n",
      " |      \n",
      " |      This is a high-level setting for maintaining width and height of the component. To\n",
      " |      gain more fine grained control over sizing, use ``width_policy``, ``height_policy``\n",
      " |      and ``aspect_ratio`` instead (those take precedence over ``sizing_mode``).\n",
      " |      \n",
      " |      Possible scenarios:\n",
      " |      \n",
      " |      ``\"fixed\"``\n",
      " |          Component is not responsive. It will retain its original width and height\n",
      " |          regardless of any subsequent browser window resize events.\n",
      " |      \n",
      " |      ``\"stretch_width\"``\n",
      " |          Component will responsively resize to stretch to the available width, without\n",
      " |          maintaining any aspect ratio. The height of the component depends on the type\n",
      " |          of the component and may be fixed or fit to component's contents.\n",
      " |      \n",
      " |      ``\"stretch_height\"``\n",
      " |          Component will responsively resize to stretch to the available height, without\n",
      " |          maintaining any aspect ratio. The width of the component depends on the type\n",
      " |          of the component and may be fixed or fit to component's contents.\n",
      " |      \n",
      " |      ``\"stretch_both\"``\n",
      " |          Component is completely responsive, independently in width and height, and\n",
      " |          will occupy all the available horizontal and vertical space, even if this\n",
      " |          changes the aspect ratio of the component.\n",
      " |      \n",
      " |      ``\"scale_width\"``\n",
      " |          Component will responsively resize to stretch to the available width, while\n",
      " |          maintaining the original or provided aspect ratio.\n",
      " |      \n",
      " |      ``\"scale_height\"``\n",
      " |          Component will responsively resize to stretch to the available height, while\n",
      " |          maintaining the original or provided aspect ratio.\n",
      " |      \n",
      " |      ``\"scale_both\"``\n",
      " |          Component will responsively resize to both the available width and height, while\n",
      " |          maintaining the original or provided aspect ratio.\n",
      " |  \n",
      " |  visible\n",
      " |      Whether the component will be visible and a part of a layout.\n",
      " |  \n",
      " |  width\n",
      " |      The width of the component (in pixels).\n",
      " |      \n",
      " |      This can be either fixed or preferred width, depending on width sizing policy.\n",
      " |  \n",
      " |  width_policy\n",
      " |      Describes how the component should maintain its width.\n",
      " |      \n",
      " |      ``\"auto\"``\n",
      " |          Use component's preferred sizing policy.\n",
      " |      \n",
      " |      ``\"fixed\"``\n",
      " |          Use exactly ``width`` pixels. Component will overflow if it can't fit in the\n",
      " |          available horizontal space.\n",
      " |      \n",
      " |      ``\"fit\"``\n",
      " |          Use component's preferred width (if set) and allow it to fit into the available\n",
      " |          horizontal space within the minimum and maximum width bounds (if set). Component's\n",
      " |          width neither will be aggressively minimized nor maximized.\n",
      " |      \n",
      " |      ``\"min\"``\n",
      " |          Use as little horizontal space as possible, not less than the minimum width (if set).\n",
      " |          The starting point is the preferred width (if set). The width of the component may\n",
      " |          shrink or grow depending on the parent layout, aspect management and other factors.\n",
      " |      \n",
      " |      ``\"max\"``\n",
      " |          Use as much horizontal space as possible, not more than the maximum width (if set).\n",
      " |          The starting point is the preferred width (if set). The width of the component may\n",
      " |          shrink or grow depending on the parent layout, aspect management and other factors.\n",
      " |      \n",
      " |      .. note::\n",
      " |          This is an experimental feature and may change in future. Use it at your\n",
      " |          own discretion. Prefer using ``sizing_mode`` if this level of control isn't\n",
      " |          strictly necessary.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from bokeh.model.Model:\n",
      " |  \n",
      " |  __repr__ = __str__(self)\n",
      " |  \n",
      " |  __str__(self)\n",
      " |      Return str(self).\n",
      " |  \n",
      " |  js_link(self, attr, other, other_attr, attr_selector=None)\n",
      " |      Link two Bokeh model properties using JavaScript.\n",
      " |      \n",
      " |      This is a convenience method that simplifies adding a CustomJS callback\n",
      " |      to update one Bokeh model property whenever another changes value.\n",
      " |      \n",
      " |      Args:\n",
      " |      \n",
      " |          attr (str) :\n",
      " |              The name of a Bokeh property on this model\n",
      " |      \n",
      " |          other (Model):\n",
      " |              A Bokeh model to link to self.attr\n",
      " |      \n",
      " |          other_attr (str) :\n",
      " |              The property on ``other`` to link together\n",
      " |      \n",
      " |          attr_selector (Union[int, str]) :\n",
      " |              The index to link an item in a subscriptable ``attr``\n",
      " |      \n",
      " |      Added in version 1.1\n",
      " |      \n",
      " |      Raises:\n",
      " |      \n",
      " |          ValueError\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |          This code with ``js_link``:\n",
      " |      \n",
      " |          .. code :: python\n",
      " |      \n",
      " |              select.js_link('value', plot, 'sizing_mode')\n",
      " |      \n",
      " |          is equivalent to the following:\n",
      " |      \n",
      " |          .. code:: python\n",
      " |      \n",
      " |              from bokeh.models import CustomJS\n",
      " |              select.js_on_change('value',\n",
      " |                  CustomJS(args=dict(other=plot),\n",
      " |                           code=\"other.sizing_mode = this.value\"\n",
      " |                  )\n",
      " |              )\n",
      " |      \n",
      " |          Additionally, to use attr_selector to attach the left side of a range slider to a plot's x_range:\n",
      " |      \n",
      " |          .. code :: python\n",
      " |      \n",
      " |              range_slider.js_link('value', plot.x_range, 'start', attr_selector=0)\n",
      " |      \n",
      " |          which is equivalent to:\n",
      " |      \n",
      " |          .. code :: python\n",
      " |      \n",
      " |              from bokeh.models import CustomJS\n",
      " |              range_slider.js_on_change('value',\n",
      " |                  CustomJS(args=dict(other=plot.x_range),\n",
      " |                           code=\"other.start = this.value[0]\"\n",
      " |                  )\n",
      " |              )\n",
      " |  \n",
      " |  js_on_change(self, event, *callbacks)\n",
      " |      Attach a ``CustomJS`` callback to an arbitrary BokehJS model event.\n",
      " |      \n",
      " |      On the BokehJS side, change events for model properties have the\n",
      " |      form ``\"change:property_name\"``. As a convenience, if the event name\n",
      " |      passed to this method is also the name of a property on the model,\n",
      " |      then it will be prefixed with ``\"change:\"`` automatically:\n",
      " |      \n",
      " |      .. code:: python\n",
      " |      \n",
      " |          # these two are equivalent\n",
      " |          source.js_on_change('data', callback)\n",
      " |          source.js_on_change('change:data', callback)\n",
      " |      \n",
      " |      However, there are other kinds of events that can be useful to respond\n",
      " |      to, in addition to property change events. For example to run a\n",
      " |      callback whenever data is streamed to a ``ColumnDataSource``, use the\n",
      " |      ``\"stream\"`` event on the source:\n",
      " |      \n",
      " |      .. code:: python\n",
      " |      \n",
      " |          source.js_on_change('streaming', callback)\n",
      " |  \n",
      " |  js_on_event(self, event, *callbacks)\n",
      " |  \n",
      " |  layout(self, side, plot)\n",
      " |  \n",
      " |  on_change(self, attr, *callbacks)\n",
      " |      Add a callback on this object to trigger when ``attr`` changes.\n",
      " |      \n",
      " |      Args:\n",
      " |          attr (str) : an attribute name on this object\n",
      " |          *callbacks (callable) : callback functions to register\n",
      " |      \n",
      " |      Returns:\n",
      " |          None\n",
      " |      \n",
      " |      Example:\n",
      " |      \n",
      " |      .. code-block:: python\n",
      " |      \n",
      " |          widget.on_change('value', callback1, callback2, ..., callback_n)\n",
      " |  \n",
      " |  references(self)\n",
      " |      Returns all ``Models`` that this object has references to.\n",
      " |  \n",
      " |  select(self, selector)\n",
      " |      Query this object and all of its references for objects that\n",
      " |      match the given selector.\n",
      " |      \n",
      " |      Args:\n",
      " |          selector (JSON-like) :\n",
      " |      \n",
      " |      Returns:\n",
      " |          seq[Model]\n",
      " |  \n",
      " |  select_one(self, selector)\n",
      " |      Query this object and all of its references for objects that\n",
      " |      match the given selector.  Raises an error if more than one object\n",
      " |      is found.  Returns single matching object, or None if nothing is found\n",
      " |      Args:\n",
      " |          selector (JSON-like) :\n",
      " |      \n",
      " |      Returns:\n",
      " |          Model\n",
      " |  \n",
      " |  set_select(self, selector, updates)\n",
      " |      Update objects that match a given selector with the specified\n",
      " |      attribute/value updates.\n",
      " |      \n",
      " |      Args:\n",
      " |          selector (JSON-like) :\n",
      " |          updates (dict) :\n",
      " |      \n",
      " |      Returns:\n",
      " |          None\n",
      " |  \n",
      " |  to_json(self, include_defaults)\n",
      " |      Returns a dictionary of the attributes of this object,\n",
      " |      containing only \"JSON types\" (string, number, boolean,\n",
      " |      none, dict, list).\n",
      " |      \n",
      " |      References to other objects are serialized as \"refs\" (just\n",
      " |      the object ID and type info), so the deserializer will\n",
      " |      need to separately have the full attributes of those\n",
      " |      other objects.\n",
      " |      \n",
      " |      There's no corresponding ``from_json()`` because to\n",
      " |      deserialize an object is normally done in the context of a\n",
      " |      Document (since the Document can resolve references).\n",
      " |      \n",
      " |      For most purposes it's best to serialize and deserialize\n",
      " |      entire documents.\n",
      " |      \n",
      " |      Args:\n",
      " |          include_defaults (bool) : whether to include attributes\n",
      " |              that haven't been changed from the default\n",
      " |  \n",
      " |  to_json_string(self, include_defaults)\n",
      " |      Returns a JSON string encoding the attributes of this object.\n",
      " |      \n",
      " |      References to other objects are serialized as references\n",
      " |      (just the object ID and type info), so the deserializer\n",
      " |      will need to separately have the full attributes of those\n",
      " |      other objects.\n",
      " |      \n",
      " |      There's no corresponding ``from_json_string()`` because to\n",
      " |      deserialize an object is normally done in the context of a\n",
      " |      Document (since the Document can resolve references).\n",
      " |      \n",
      " |      For most purposes it's best to serialize and deserialize\n",
      " |      entire documents.\n",
      " |      \n",
      " |      Args:\n",
      " |          include_defaults (bool) : whether to include attributes\n",
      " |              that haven't been changed from the default\n",
      " |  \n",
      " |  trigger(self, attr, old, new, hint=None, setter=None)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from bokeh.model.Model:\n",
      " |  \n",
      " |  __init_subclass__() from bokeh.core.has_props.MetaHasProps\n",
      " |      This method is called when a class is subclassed.\n",
      " |      \n",
      " |      The default implementation does nothing. It may be\n",
      " |      overridden to extend subclasses.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods inherited from bokeh.model.Model:\n",
      " |  \n",
      " |  __new__(cls, *args, **kwargs)\n",
      " |      Create and return a new object.  See help(type) for accurate signature.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from bokeh.model.Model:\n",
      " |  \n",
      " |  document\n",
      " |      The |Document| this model is attached to (can be ``None``)\n",
      " |  \n",
      " |  id\n",
      " |  \n",
      " |  ref\n",
      " |  \n",
      " |  struct\n",
      " |      A Bokeh protocol \"structure\" of this model, i.e. a dict of the form:\n",
      " |      \n",
      " |      .. code-block:: python\n",
      " |      \n",
      " |          {\n",
      " |              'type' : << view model name >>\n",
      " |              'id'   : << unique model id >>\n",
      " |          }\n",
      " |      \n",
      " |      Additionally there may be a `subtype` field if this model is a subtype.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors inherited from bokeh.model.Model:\n",
      " |  \n",
      " |  js_event_callbacks\n",
      " |      A mapping of event names to lists of ``CustomJS`` callbacks.\n",
      " |      \n",
      " |      Typically, rather then modifying this property directly, callbacks should be\n",
      " |      added using the ``Model.js_on_event`` method:\n",
      " |      \n",
      " |      .. code:: python\n",
      " |      \n",
      " |          callback = CustomJS(code=\"console.log('tap event occurred')\")\n",
      " |          plot.js_on_event('tap', callback)\n",
      " |  \n",
      " |  js_property_callbacks\n",
      " |      A mapping of attribute names to lists of ``CustomJS`` callbacks, to be set up on\n",
      " |      BokehJS side when the document is created.\n",
      " |      \n",
      " |      Typically, rather then modifying this property directly, callbacks should be\n",
      " |      added using the ``Model.js_on_change`` method:\n",
      " |      \n",
      " |      .. code:: python\n",
      " |      \n",
      " |          callback = CustomJS(code=\"console.log('stuff')\")\n",
      " |          plot.x_range.js_on_change('start', callback)\n",
      " |  \n",
      " |  name\n",
      " |      An arbitrary, user-supplied name for this model.\n",
      " |      \n",
      " |      This name can be useful when querying the document to retrieve specific\n",
      " |      Bokeh models.\n",
      " |      \n",
      " |      .. code:: python\n",
      " |      \n",
      " |          >>> plot.circle([1,2,3], [4,5,6], name=\"temp\")\n",
      " |          >>> plot.select(name=\"temp\")\n",
      " |          [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]\n",
      " |      \n",
      " |      .. note::\n",
      " |          No uniqueness guarantees or other conditions are enforced on any names\n",
      " |          that are provided, nor is the name used directly by Bokeh for any\n",
      " |          reason.\n",
      " |  \n",
      " |  subscribed_events\n",
      " |      List of events that are subscribed to by Python callbacks. This is\n",
      " |      the set of events that will be communicated from BokehJS back to\n",
      " |      Python for this model.\n",
      " |  \n",
      " |  tags\n",
      " |      An optional list of arbitrary, user-supplied values to attach to this\n",
      " |      model.\n",
      " |      \n",
      " |      This data can be useful when querying the document to retrieve specific\n",
      " |      Bokeh models:\n",
      " |      \n",
      " |      .. code:: python\n",
      " |      \n",
      " |          >>> r = plot.circle([1,2,3], [4,5,6])\n",
      " |          >>> r.tags = [\"foo\", 10]\n",
      " |          >>> plot.select(tags=['foo', 10])\n",
      " |          [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]\n",
      " |      \n",
      " |      Or simply a convenient way to attach any necessary metadata to a model\n",
      " |      that can be accessed by ``CustomJS`` callbacks, etc.\n",
      " |      \n",
      " |      .. note::\n",
      " |          No uniqueness guarantees or other conditions are enforced on any tags\n",
      " |          that are provided, nor are the tags used directly by Bokeh for any\n",
      " |          reason.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from bokeh.model.Model:\n",
      " |  \n",
      " |  model_class_reverse_map = {'AbstractButton': <class 'bokeh.models.widg...\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from bokeh.core.has_props.HasProps:\n",
      " |  \n",
      " |  __setattr__(self, name, value)\n",
      " |      Intercept attribute setting on HasProps in order to special case\n",
      " |      a few situations:\n",
      " |      \n",
      " |      * short circuit all property machinery for ``_private`` attributes\n",
      " |      * suggest similar attribute names on attribute errors\n",
      " |      \n",
      " |      Args:\n",
      " |          name (str) : the name of the attribute to set on this object\n",
      " |          value (obj) : the value to set\n",
      " |      \n",
      " |      Returns:\n",
      " |          None\n",
      " |  \n",
      " |  apply_theme(self, property_values)\n",
      " |      Apply a set of theme values which will be used rather than\n",
      " |      defaults, but will not override application-set values.\n",
      " |      \n",
      " |      The passed-in dictionary may be kept around as-is and shared with\n",
      " |      other instances to save memory (so neither the caller nor the\n",
      " |      |HasProps| instance should modify it).\n",
      " |      \n",
      " |      Args:\n",
      " |          property_values (dict) : theme values to use in place of defaults\n",
      " |      \n",
      " |      Returns:\n",
      " |          None\n",
      " |  \n",
      " |  equals(self, other)\n",
      " |      Structural equality of models.\n",
      " |      \n",
      " |      Args:\n",
      " |          other (HasProps) : the other instance to compare to\n",
      " |      \n",
      " |      Returns:\n",
      " |          True, if properties are structurally equal, otherwise False\n",
      " |  \n",
      " |  properties_with_values(self, include_defaults: bool = True) -> Dict[str, Any]\n",
      " |      Collect a dict mapping property names to their values.\n",
      " |      \n",
      " |      This method *always* traverses the class hierarchy and includes\n",
      " |      properties defined on any parent classes.\n",
      " |      \n",
      " |      Non-serializable properties are skipped and property values are in\n",
      " |      \"serialized\" format which may be slightly different from the values\n",
      " |      you would normally read from the properties; the intent of this method\n",
      " |      is to return the information needed to losslessly reconstitute the\n",
      " |      object instance.\n",
      " |      \n",
      " |      Args:\n",
      " |          include_defaults (bool, optional) :\n",
      " |              Whether to include properties that haven't been explicitly set\n",
      " |              since the object was created. (default: True)\n",
      " |      \n",
      " |      Returns:\n",
      " |         dict : mapping from property names to their values\n",
      " |  \n",
      " |  query_properties_with_values(self, query, include_defaults=True)\n",
      " |      Query the properties values of |HasProps| instances with a\n",
      " |      predicate.\n",
      " |      \n",
      " |      Args:\n",
      " |          query (callable) :\n",
      " |              A callable that accepts property descriptors and returns True\n",
      " |              or False\n",
      " |      \n",
      " |          include_defaults (bool, optional) :\n",
      " |              Whether to include properties that have not been explicitly\n",
      " |              set by a user (default: True)\n",
      " |      \n",
      " |      Returns:\n",
      " |          dict : mapping of property names and values for matching properties\n",
      " |  \n",
      " |  set_from_json(self, name, json, models=None, setter=None)\n",
      " |      Set a property value on this object from JSON.\n",
      " |      \n",
      " |      Args:\n",
      " |          name: (str) : name of the attribute to set\n",
      " |      \n",
      " |          json: (JSON-value) : value to set to the attribute to\n",
      " |      \n",
      " |          models (dict or None, optional) :\n",
      " |              Mapping of model ids to models (default: None)\n",
      " |      \n",
      " |              This is needed in cases where the attributes to update also\n",
      " |              have values that have references.\n",
      " |      \n",
      " |          setter(ClientSession or ServerSession or None, optional) :\n",
      " |              This is used to prevent \"boomerang\" updates to Bokeh apps.\n",
      " |      \n",
      " |              In the context of a Bokeh server application, incoming updates\n",
      " |              to properties will be annotated with the session that is\n",
      " |              doing the updating. This value is propagated through any\n",
      " |              subsequent change notifications that the update triggers.\n",
      " |              The session can compare the event setter to itself, and\n",
      " |              suppress any updates that originate from itself.\n",
      " |      \n",
      " |      Returns:\n",
      " |          None\n",
      " |  \n",
      " |  themed_values(self)\n",
      " |      Get any theme-provided overrides.\n",
      " |      \n",
      " |      Results are returned as a dict from property name to value, or\n",
      " |      ``None`` if no theme overrides any values for this instance.\n",
      " |      \n",
      " |      Returns:\n",
      " |          dict or None\n",
      " |  \n",
      " |  unapply_theme(self)\n",
      " |      Remove any themed values and restore defaults.\n",
      " |      \n",
      " |      Returns:\n",
      " |          None\n",
      " |  \n",
      " |  update(self, **kwargs)\n",
      " |      Updates the object's properties from the given keyword arguments.\n",
      " |      \n",
      " |      Returns:\n",
      " |          None\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |          The following are equivalent:\n",
      " |      \n",
      " |          .. code-block:: python\n",
      " |      \n",
      " |              from bokeh.models import Range1d\n",
      " |      \n",
      " |              r = Range1d\n",
      " |      \n",
      " |              # set properties individually:\n",
      " |              r.start = 10\n",
      " |              r.end = 20\n",
      " |      \n",
      " |              # update properties together:\n",
      " |              r.update(start=10, end=20)\n",
      " |  \n",
      " |  update_from_json(self, json_attributes, models=None, setter=None)\n",
      " |      Updates the object's properties from a JSON attributes dictionary.\n",
      " |      \n",
      " |      Args:\n",
      " |          json_attributes: (JSON-dict) : attributes and values to update\n",
      " |      \n",
      " |          models (dict or None, optional) :\n",
      " |              Mapping of model ids to models (default: None)\n",
      " |      \n",
      " |              This is needed in cases where the attributes to update also\n",
      " |              have values that have references.\n",
      " |      \n",
      " |          setter(ClientSession or ServerSession or None, optional) :\n",
      " |              This is used to prevent \"boomerang\" updates to Bokeh apps.\n",
      " |      \n",
      " |              In the context of a Bokeh server application, incoming updates\n",
      " |              to properties will be annotated with the session that is\n",
      " |              doing the updating. This value is propagated through any\n",
      " |              subsequent change notifications that the update triggers.\n",
      " |              The session can compare the event setter to itself, and\n",
      " |              suppress any updates that originate from itself.\n",
      " |      \n",
      " |      Returns:\n",
      " |          None\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from bokeh.core.has_props.HasProps:\n",
      " |  \n",
      " |  dataspecs() from bokeh.core.has_props.MetaHasProps\n",
      " |      Collect the names of all ``DataSpec`` properties on this class.\n",
      " |      \n",
      " |      This method *always* traverses the class hierarchy and includes\n",
      " |      properties defined on any parent classes.\n",
      " |      \n",
      " |      Returns:\n",
      " |          set[str] : names of ``DataSpec`` properties\n",
      " |  \n",
      " |  dataspecs_with_props() from bokeh.core.has_props.MetaHasProps\n",
      " |      Collect a dict mapping the names of all ``DataSpec`` properties\n",
      " |      on this class to the associated properties.\n",
      " |      \n",
      " |      This method *always* traverses the class hierarchy and includes\n",
      " |      properties defined on any parent classes.\n",
      " |      \n",
      " |      Returns:\n",
      " |          dict[str, DataSpec] : mapping of names and ``DataSpec`` properties\n",
      " |  \n",
      " |  lookup(name) from bokeh.core.has_props.MetaHasProps\n",
      " |      Find the ``PropertyDescriptor`` for a Bokeh property on a class,\n",
      " |      given the property name.\n",
      " |      \n",
      " |      Args:\n",
      " |          name (str) : name of the property to search for\n",
      " |      \n",
      " |      Returns:\n",
      " |          PropertyDescriptor : descriptor for property named ``name``\n",
      " |  \n",
      " |  properties(with_bases=True) from bokeh.core.has_props.MetaHasProps\n",
      " |      Collect the names of properties on this class.\n",
      " |      \n",
      " |      This method *optionally* traverses the class hierarchy and includes\n",
      " |      properties defined on any parent classes.\n",
      " |      \n",
      " |      Args:\n",
      " |          with_bases (bool, optional) :\n",
      " |              Whether to include properties defined on parent classes in\n",
      " |              the results. (default: True)\n",
      " |      \n",
      " |      Returns:\n",
      " |         set[str] : property names\n",
      " |  \n",
      " |  properties_containers() from bokeh.core.has_props.MetaHasProps\n",
      " |      Collect the names of all container properties on this class.\n",
      " |      \n",
      " |      This method *always* traverses the class hierarchy and includes\n",
      " |      properties defined on any parent classes.\n",
      " |      \n",
      " |      Returns:\n",
      " |          set[str] : names of container properties\n",
      " |  \n",
      " |  properties_with_refs() from bokeh.core.has_props.MetaHasProps\n",
      " |      Collect the names of all properties on this class that also have\n",
      " |      references.\n",
      " |      \n",
      " |      This method *always* traverses the class hierarchy and includes\n",
      " |      properties defined on any parent classes.\n",
      " |      \n",
      " |      Returns:\n",
      " |          set[str] : names of properties that have references\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors inherited from bokeh.core.has_props.HasProps:\n",
      " |  \n",
      " |  __dict__\n",
      " |      dictionary for instance variables (if defined)\n",
      " |  \n",
      " |  __weakref__\n",
      " |      list of weak references to the object (if defined)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from bokeh.util.callback_manager.PropertyCallbackManager:\n",
      " |  \n",
      " |  remove_on_change(self, attr, *callbacks)\n",
      " |      Remove a callback from this object\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from bokeh.util.callback_manager.EventCallbackManager:\n",
      " |  \n",
      " |  on_event(self, event, *callbacks)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(gridplot([]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"8079bd9a-acf4-49c7-87c7-e9d05b21b8d8\" data-root-id=\"27155\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"af125a31-93b2-4adf-9136-f0beef8b2049\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"27164\"}],\"center\":[{\"id\":\"27167\"},{\"id\":\"27171\"}],\"left\":[{\"id\":\"27168\"}],\"plot_height\":300,\"plot_width\":300,\"renderers\":[{\"id\":\"27202\"}],\"title\":{\"id\":\"28010\"},\"toolbar\":{\"id\":\"27187\"},\"x_range\":{\"id\":\"27156\"},\"x_scale\":{\"id\":\"27160\"},\"y_range\":{\"id\":\"27158\"},\"y_scale\":{\"id\":\"27162\"}},\"id\":\"27155\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"overlay\":{\"id\":\"27186\"}},\"id\":\"27181\",\"type\":\"PolySelectTool\"},{\"attributes\":{},\"id\":\"27160\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"27175\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"28019\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text\":\"\"},\"id\":\"28010\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"27158\",\"type\":\"DataRange1d\"},{\"attributes\":{\"overlay\":{\"id\":\"27185\"}},\"id\":\"27182\",\"type\":\"LassoSelectTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"27172\"},{\"id\":\"27173\"},{\"id\":\"27174\"},{\"id\":\"27175\"},{\"id\":\"27176\"},{\"id\":\"27177\"},{\"id\":\"27178\"},{\"id\":\"27179\"},{\"id\":\"27180\"},{\"id\":\"27181\"},{\"id\":\"27182\"}]},\"id\":\"27187\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"27162\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"27185\",\"type\":\"PolyAnnotation\"},{\"attributes\":{\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"27186\",\"type\":\"PolyAnnotation\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"27183\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"overlay\":{\"id\":\"27184\"}},\"id\":\"27176\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"28013\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"27177\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"field\":\"fill_color\"},\"line_color\":{\"value\":null},\"radius\":{\"field\":\"radius\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"27200\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"fill_color\":[\"#d3ab96\",\"#acd296\",\"#69c596\",\"#831e96\",\"#40c896\",\"#ed8d96\",\"#e6cc96\",\"#639e96\",\"#5e9996\",\"#63c296\",\"#4e4496\",\"#896b96\",\"#db9d96\",\"#756c96\",\"#bd5d96\",\"#ef3896\",\"#4e2696\",\"#3fd896\",\"#7c4f96\",\"#47b296\",\"#be7196\",\"#5f4596\",\"#9ebe96\",\"#373c96\",\"#88da96\",\"#dbe296\",\"#517496\",\"#f8e096\",\"#e58a96\",\"#c77a96\",\"#8a4796\",\"#9b4d96\",\"#572896\",\"#d2de96\",\"#b9be96\",\"#90cb96\",\"#542f96\",\"#6fa396\",\"#6d8096\",\"#a68c96\"],\"radius\":{\"__ndarray__\":\"TPGRl3Y8uT/6C/Jofmr2P82/XHvpzO0/B4k9wS7e1T8QLnaPK0efP6JCGja5Te4/Uxv+BvZP7D+m7NPUStrxP76Y1cNGG8o/uKNieQ0T9D+eUwnSSQDlPzRb5Xa9+PY/h8lzfEP47D9k9hOQbb70P7MhjT8BfvU/lKIUkhgOvT9gLriPEAGrPx+agKLL99o/NlWC/OEd3T/wR/TlxTDuP7TdaLlbRvE/vpqy2Xkz7z8dzTsjDgz1P4JiUTpYIss/22sBEPbT9j9kPH3O60rQP0CmrFOX4vI/msf2MhJF8j8Am833qedzP0O/tRI7T9c/+2uVWIm58T+HkGZyxILwP0COarpt0YU/MFVre+oi7T9ztRsp8kHWPykxWUa3J/c/+8PkosGs1D+qVNqDUJDkPzKNi9AL2e4/aaxTi2Ow9T8=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]},\"x\":{\"__ndarray__\":\"nzVrwEblOUBayH42Ei9SQEQLpx8FSU9A4Irw8z/YOkDtbUhwf1xAQGczddHrIFFA9OUYH60/REAxyti5zrBNQO8Zij4JMipAvaxK6DVnSkBBeyPpiT9AQOtO2koP5UxA/ZLBxLC/UUCQelwZYmLaPwYQjfUcZEhAOkdasHpfQkCc+ppj6kAHQKiC7jfJTSxAwQ+GjWNIU0CTwB/tX7tSQMYQRg44IzVAG01nNv8iGUAoz+K/8c5TQK/b+tFwICFACfb/KDrWT0C5eWcsYQhYQC7I1Mm6plZA5Dvz7wuhNkAPa18GxTVYQExu0SKSE1dAqmlMhFszO0CgZNrwp/FXQE/ICmu+4yZAFwMAGZcmOUD/k/U2eytKQBSU/qhTIiJAoHWrUSMLMECSjd+C1uE6QPmd3BYkrEtArmJGjgs4VEA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]},\"y\":{\"__ndarray__\":\"WgwG8JtIT0BxG64B4UhXQGG8m6BH/1hAQddqeKYiSUDz2pLS90ZXQKy2Ju2b31VAsIJirzNRWEA78sP+xQ9VQJmCkFEPjUpAX3BEtTgFPkBXkPBdRvJTQH8BOafmdkNANnH3OealCEC3z7zqkelTQHYpKe2Vn1dA9oiiEodxFECPE1GlKMpTQIOdxofjI0xAqPZD9Cb4U0DSxx86EcdCQJddrWv5+zBAzmKTsgzDT0Cm+xUjxaMLQBuiWBm7zE1AsRcdt4wzN0AYFsotDNA1QDMD6g/8Z0FA3MF6dILxUkB9whe8E3JWQIF5/CX151NAsiGZFYS78D+UZByDliEhQM5rLA8sg0VA3EgeVN34VEBQU85Od7cjQLrVSySdVlRAGAoL+0m7T0D0viYXNCJQQDRhgYuJQ1BAAE9q2Cv6F0A=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]}},\"selected\":{\"id\":\"28020\"},\"selection_policy\":{\"id\":\"28019\"}},\"id\":\"27199\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"formatter\":{\"id\":\"28011\"},\"ticker\":{\"id\":\"27165\"}},\"id\":\"27164\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"fill_color\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":null},\"radius\":{\"field\":\"radius\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"27201\",\"type\":\"Circle\"},{\"attributes\":{\"axis\":{\"id\":\"27168\"},\"dimension\":1,\"ticker\":null},\"id\":\"27171\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null},\"id\":\"27172\",\"type\":\"HoverTool\"},{\"attributes\":{\"source\":{\"id\":\"27199\"}},\"id\":\"27203\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"28020\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"27164\"},\"ticker\":null},\"id\":\"27167\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"27169\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"27179\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"27165\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null},\"id\":\"27178\",\"type\":\"TapTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"27184\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"formatter\":{\"id\":\"28013\"},\"ticker\":{\"id\":\"27169\"}},\"id\":\"27168\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data_source\":{\"id\":\"27199\"},\"glyph\":{\"id\":\"27200\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"27201\"},\"selection_glyph\":null,\"view\":{\"id\":\"27203\"}},\"id\":\"27202\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"27183\"}},\"id\":\"27180\",\"type\":\"BoxSelectTool\"},{\"attributes\":{},\"id\":\"27173\",\"type\":\"CrosshairTool\"},{\"attributes\":{},\"id\":\"27156\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"27174\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"28011\",\"type\":\"BasicTickFormatter\"}],\"root_ids\":[\"27155\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"af125a31-93b2-4adf-9136-f0beef8b2049\",\"root_ids\":[\"27155\"],\"roots\":{\"27155\":\"8079bd9a-acf4-49c7-87c7-e9d05b21b8d8\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "27155"
      }
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"4c70303d-797c-4fb2-8df3-bd8a37c7dd7b\" data-root-id=\"27204\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"c1163a51-bfe3-4206-afb1-bcc48b10e4fb\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"27213\"}],\"center\":[{\"id\":\"27216\"},{\"id\":\"27220\"}],\"left\":[{\"id\":\"27217\"}],\"plot_height\":300,\"plot_width\":300,\"renderers\":[{\"id\":\"27251\"}],\"title\":{\"id\":\"28862\"},\"toolbar\":{\"id\":\"27236\"},\"x_range\":{\"id\":\"27205\"},\"x_scale\":{\"id\":\"27209\"},\"y_range\":{\"id\":\"27207\"},\"y_scale\":{\"id\":\"27211\"}},\"id\":\"27204\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"27211\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"28865\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null},\"id\":\"27221\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"27214\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"27209\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"fill_color\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":null},\"radius\":{\"field\":\"radius\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"27250\",\"type\":\"Circle\"},{\"attributes\":{\"axis\":{\"id\":\"27213\"},\"ticker\":null},\"id\":\"27216\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"27205\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"28863\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"fill_color\":[\"#96d3ab\",\"#96acd2\",\"#9669c5\",\"#96831e\",\"#9640c8\",\"#96ed8d\",\"#96e6cc\",\"#96639e\",\"#965e99\",\"#9663c2\",\"#964e44\",\"#96896b\",\"#96db9d\",\"#96756c\",\"#96bd5d\",\"#96ef38\",\"#964e26\",\"#963fd8\",\"#967c4f\",\"#9647b2\",\"#96be71\",\"#965f45\",\"#969ebe\",\"#96373c\",\"#9688da\",\"#96dbe2\",\"#965174\",\"#96f8e0\",\"#96e58a\",\"#96c77a\",\"#968a47\",\"#969b4d\",\"#965728\",\"#96d2de\",\"#96b9be\",\"#9690cb\",\"#96542f\",\"#966fa3\",\"#966d80\",\"#96a68c\"],\"radius\":{\"__ndarray__\":\"TPGRl3Y8uT/6C/Jofmr2P82/XHvpzO0/B4k9wS7e1T8QLnaPK0efP6JCGja5Te4/Uxv+BvZP7D+m7NPUStrxP76Y1cNGG8o/uKNieQ0T9D+eUwnSSQDlPzRb5Xa9+PY/h8lzfEP47D9k9hOQbb70P7MhjT8BfvU/lKIUkhgOvT9gLriPEAGrPx+agKLL99o/NlWC/OEd3T/wR/TlxTDuP7TdaLlbRvE/vpqy2Xkz7z8dzTsjDgz1P4JiUTpYIss/22sBEPbT9j9kPH3O60rQP0CmrFOX4vI/msf2MhJF8j8Am833qedzP0O/tRI7T9c/+2uVWIm58T+HkGZyxILwP0COarpt0YU/MFVre+oi7T9ztRsp8kHWPykxWUa3J/c/+8PkosGs1D+qVNqDUJDkPzKNi9AL2e4/aaxTi2Ow9T8=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]},\"x\":{\"__ndarray__\":\"KCzpFT8BV0BNHTZyZ6c0QAEhWd1JczZAvIhG27QuMUAiUfERoqhRQCC4tnXY+S5AOQs6oN9uMUDNXqsmED4YQPY0CZdHOC5AdqrtC7b8TkDRNbgCwEcDQOk7tRnlt1NAr2IGUDz4Q0Bn159JMtlGQP27rhDiFFNA8BkwujxFSECaFzRAVixVQAubL6d2KBFAHMTTBe+kG0BL2bgu1/AzQGVHDQppxj9Am8iwxpZiMUAGwCM8BH5TQMJks4g/OTpAlgN+5vWwUkDHa+smS7xTQP5MapcfFFdArJbwvVv3UEAh8XCWG/YmQCdJxqoK81BAqu4p5w1JVUCssnE9OFxAQGkKJKVIwzVAiaqgg+PLMkCFN0mgS+RAQCRCgRt6li1Ag47Hj2BuUEAZQM6ljyVJQBixriFvCUBAjlouU2mnSkA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]},\"y\":{\"__ndarray__\":\"TbdavBRZHEB53KN0rZYgQCTtyYRW1ThAoqRV62u0NUD3gqxfcNlKQEyhBFZBWFdAAslSzVXJLEDt5KY9BGZTQJ13p9cmdUxAi1CUYWVJTEA518Jhz3ZTQO0xAsWu1FdAMrBug7YLVEAeBv3l6wj4P5Q34A7E/1NAHzFPbaTuSEBJaitipUg4QLpVoii2FERA7v8enFVZTUC6xoU8KkAYQEj+179PO0RA/MZfOwEL4z/5NbHANZ9YQEMdvlTpD0NAF16zzqnMU0D656xZnJdSQGZuhLsdik9ANoWwKBEDPEBO0SgmXhU5QKyNSIHdSlBA/NYqAJroLkB1vpmlxhpQQHmXN337PUlAevOc+03UQ0A5HSubn0tYQIJ1BJxiWURAJYlxQHXsSkCyp4kiU8tFQFAApOz8MT9A5r4NIzSNVUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]}},\"selected\":{\"id\":\"28872\"},\"selection_policy\":{\"id\":\"28871\"}},\"id\":\"27248\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text\":\"\"},\"id\":\"28862\",\"type\":\"Title\"},{\"attributes\":{\"formatter\":{\"id\":\"28865\"},\"ticker\":{\"id\":\"27218\"}},\"id\":\"27217\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"27218\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"27217\"},\"dimension\":1,\"ticker\":null},\"id\":\"27220\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"27232\"}},\"id\":\"27229\",\"type\":\"BoxSelectTool\"},{\"attributes\":{\"formatter\":{\"id\":\"28863\"},\"ticker\":{\"id\":\"27214\"}},\"id\":\"27213\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"27207\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"27224\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"28871\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"27235\",\"type\":\"PolyAnnotation\"},{\"attributes\":{},\"id\":\"27223\",\"type\":\"PanTool\"},{\"attributes\":{\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"27234\",\"type\":\"PolyAnnotation\"},{\"attributes\":{},\"id\":\"28872\",\"type\":\"Selection\"},{\"attributes\":{\"overlay\":{\"id\":\"27233\"}},\"id\":\"27225\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"27226\",\"type\":\"ResetTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"27232\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"27248\"}},\"id\":\"27252\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"27222\",\"type\":\"CrosshairTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"field\":\"fill_color\"},\"line_color\":{\"value\":null},\"radius\":{\"field\":\"radius\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"27249\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"27228\",\"type\":\"SaveTool\"},{\"attributes\":{\"data_source\":{\"id\":\"27248\"},\"glyph\":{\"id\":\"27249\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"27250\"},\"selection_glyph\":null,\"view\":{\"id\":\"27252\"}},\"id\":\"27251\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null},\"id\":\"27227\",\"type\":\"TapTool\"},{\"attributes\":{\"overlay\":{\"id\":\"27235\"}},\"id\":\"27230\",\"type\":\"PolySelectTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"27233\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"27221\"},{\"id\":\"27222\"},{\"id\":\"27223\"},{\"id\":\"27224\"},{\"id\":\"27225\"},{\"id\":\"27226\"},{\"id\":\"27227\"},{\"id\":\"27228\"},{\"id\":\"27229\"},{\"id\":\"27230\"},{\"id\":\"27231\"}]},\"id\":\"27236\",\"type\":\"Toolbar\"},{\"attributes\":{\"overlay\":{\"id\":\"27234\"}},\"id\":\"27231\",\"type\":\"LassoSelectTool\"}],\"root_ids\":[\"27204\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"c1163a51-bfe3-4206-afb1-bcc48b10e4fb\",\"root_ids\":[\"27204\"],\"roots\":{\"27204\":\"4c70303d-797c-4fb2-8df3-bd8a37c7dd7b\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "27204"
      }
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"b49642c7-46c3-44f9-945d-8450363be528\" data-root-id=\"28974\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"30207633-15e5-4e07-b567-7d4437614c14\":{\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"28973\"},{\"id\":\"28971\"}]},\"id\":\"28974\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"27211\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null},\"id\":\"27221\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"27214\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"27209\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"27213\"},\"ticker\":null},\"id\":\"27216\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"27205\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"fill_color\":[\"#96d3ab\",\"#96acd2\",\"#9669c5\",\"#96831e\",\"#9640c8\",\"#96ed8d\",\"#96e6cc\",\"#96639e\",\"#965e99\",\"#9663c2\",\"#964e44\",\"#96896b\",\"#96db9d\",\"#96756c\",\"#96bd5d\",\"#96ef38\",\"#964e26\",\"#963fd8\",\"#967c4f\",\"#9647b2\",\"#96be71\",\"#965f45\",\"#969ebe\",\"#96373c\",\"#9688da\",\"#96dbe2\",\"#965174\",\"#96f8e0\",\"#96e58a\",\"#96c77a\",\"#968a47\",\"#969b4d\",\"#965728\",\"#96d2de\",\"#96b9be\",\"#9690cb\",\"#96542f\",\"#966fa3\",\"#966d80\",\"#96a68c\"],\"radius\":{\"__ndarray__\":\"TPGRl3Y8uT/6C/Jofmr2P82/XHvpzO0/B4k9wS7e1T8QLnaPK0efP6JCGja5Te4/Uxv+BvZP7D+m7NPUStrxP76Y1cNGG8o/uKNieQ0T9D+eUwnSSQDlPzRb5Xa9+PY/h8lzfEP47D9k9hOQbb70P7MhjT8BfvU/lKIUkhgOvT9gLriPEAGrPx+agKLL99o/NlWC/OEd3T/wR/TlxTDuP7TdaLlbRvE/vpqy2Xkz7z8dzTsjDgz1P4JiUTpYIss/22sBEPbT9j9kPH3O60rQP0CmrFOX4vI/msf2MhJF8j8Am833qedzP0O/tRI7T9c/+2uVWIm58T+HkGZyxILwP0COarpt0YU/MFVre+oi7T9ztRsp8kHWPykxWUa3J/c/+8PkosGs1D+qVNqDUJDkPzKNi9AL2e4/aaxTi2Ow9T8=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]},\"x\":{\"__ndarray__\":\"KCzpFT8BV0BNHTZyZ6c0QAEhWd1JczZAvIhG27QuMUAiUfERoqhRQCC4tnXY+S5AOQs6oN9uMUDNXqsmED4YQPY0CZdHOC5AdqrtC7b8TkDRNbgCwEcDQOk7tRnlt1NAr2IGUDz4Q0Bn159JMtlGQP27rhDiFFNA8BkwujxFSECaFzRAVixVQAubL6d2KBFAHMTTBe+kG0BL2bgu1/AzQGVHDQppxj9Am8iwxpZiMUAGwCM8BH5TQMJks4g/OTpAlgN+5vWwUkDHa+smS7xTQP5MapcfFFdArJbwvVv3UEAh8XCWG/YmQCdJxqoK81BAqu4p5w1JVUCssnE9OFxAQGkKJKVIwzVAiaqgg+PLMkCFN0mgS+RAQCRCgRt6li1Ag47Hj2BuUEAZQM6ljyVJQBixriFvCUBAjlouU2mnSkA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]},\"y\":{\"__ndarray__\":\"TbdavBRZHEB53KN0rZYgQCTtyYRW1ThAoqRV62u0NUD3gqxfcNlKQEyhBFZBWFdAAslSzVXJLEDt5KY9BGZTQJ13p9cmdUxAi1CUYWVJTEA518Jhz3ZTQO0xAsWu1FdAMrBug7YLVEAeBv3l6wj4P5Q34A7E/1NAHzFPbaTuSEBJaitipUg4QLpVoii2FERA7v8enFVZTUC6xoU8KkAYQEj+179PO0RA/MZfOwEL4z/5NbHANZ9YQEMdvlTpD0NAF16zzqnMU0D656xZnJdSQGZuhLsdik9ANoWwKBEDPEBO0SgmXhU5QKyNSIHdSlBA/NYqAJroLkB1vpmlxhpQQHmXN337PUlAevOc+03UQ0A5HSubn0tYQIJ1BJxiWURAJYlxQHXsSkCyp4kiU8tFQFAApOz8MT9A5r4NIzSNVUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]}},\"selected\":{\"id\":\"28872\"},\"selection_policy\":{\"id\":\"28871\"}},\"id\":\"27248\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"formatter\":{\"id\":\"28865\"},\"ticker\":{\"id\":\"27218\"}},\"id\":\"27217\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"27218\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"27217\"},\"dimension\":1,\"ticker\":null},\"id\":\"27220\",\"type\":\"Grid\"},{\"attributes\":{\"below\":[{\"id\":\"27164\"}],\"center\":[{\"id\":\"27167\"},{\"id\":\"27171\"}],\"left\":[{\"id\":\"27168\"}],\"plot_height\":300,\"plot_width\":300,\"renderers\":[{\"id\":\"27202\"}],\"title\":{\"id\":\"28010\"},\"toolbar\":{\"id\":\"27187\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"27156\"},\"x_scale\":{\"id\":\"27160\"},\"y_range\":{\"id\":\"27158\"},\"y_scale\":{\"id\":\"27162\"}},\"id\":\"27155\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"overlay\":{\"id\":\"27232\"}},\"id\":\"27229\",\"type\":\"BoxSelectTool\"},{\"attributes\":{\"overlay\":{\"id\":\"27184\"}},\"id\":\"27176\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"field\":\"fill_color\"},\"line_color\":{\"value\":null},\"radius\":{\"field\":\"radius\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"27200\",\"type\":\"Circle\"},{\"attributes\":{\"formatter\":{\"id\":\"28011\"},\"ticker\":{\"id\":\"27165\"}},\"id\":\"27164\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"fill_color\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":null},\"radius\":{\"field\":\"radius\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"27201\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null},\"id\":\"27172\",\"type\":\"HoverTool\"},{\"attributes\":{\"source\":{\"id\":\"27199\"}},\"id\":\"27203\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"27164\"},\"ticker\":null},\"id\":\"27167\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"27179\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"field\":\"fill_color\"},\"line_color\":{\"value\":null},\"radius\":{\"field\":\"radius\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"27249\",\"type\":\"Circle\"},{\"attributes\":{\"toolbar\":{\"id\":\"28972\"},\"toolbar_location\":\"above\"},\"id\":\"28973\",\"type\":\"ToolbarBox\"},{\"attributes\":{},\"id\":\"27174\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"27160\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"27158\",\"type\":\"DataRange1d\"},{\"attributes\":{\"formatter\":{\"id\":\"28863\"},\"ticker\":{\"id\":\"27214\"}},\"id\":\"27213\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"fill_color\":[\"#d3ab96\",\"#acd296\",\"#69c596\",\"#831e96\",\"#40c896\",\"#ed8d96\",\"#e6cc96\",\"#639e96\",\"#5e9996\",\"#63c296\",\"#4e4496\",\"#896b96\",\"#db9d96\",\"#756c96\",\"#bd5d96\",\"#ef3896\",\"#4e2696\",\"#3fd896\",\"#7c4f96\",\"#47b296\",\"#be7196\",\"#5f4596\",\"#9ebe96\",\"#373c96\",\"#88da96\",\"#dbe296\",\"#517496\",\"#f8e096\",\"#e58a96\",\"#c77a96\",\"#8a4796\",\"#9b4d96\",\"#572896\",\"#d2de96\",\"#b9be96\",\"#90cb96\",\"#542f96\",\"#6fa396\",\"#6d8096\",\"#a68c96\"],\"radius\":{\"__ndarray__\":\"TPGRl3Y8uT/6C/Jofmr2P82/XHvpzO0/B4k9wS7e1T8QLnaPK0efP6JCGja5Te4/Uxv+BvZP7D+m7NPUStrxP76Y1cNGG8o/uKNieQ0T9D+eUwnSSQDlPzRb5Xa9+PY/h8lzfEP47D9k9hOQbb70P7MhjT8BfvU/lKIUkhgOvT9gLriPEAGrPx+agKLL99o/NlWC/OEd3T/wR/TlxTDuP7TdaLlbRvE/vpqy2Xkz7z8dzTsjDgz1P4JiUTpYIss/22sBEPbT9j9kPH3O60rQP0CmrFOX4vI/msf2MhJF8j8Am833qedzP0O/tRI7T9c/+2uVWIm58T+HkGZyxILwP0COarpt0YU/MFVre+oi7T9ztRsp8kHWPykxWUa3J/c/+8PkosGs1D+qVNqDUJDkPzKNi9AL2e4/aaxTi2Ow9T8=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]},\"x\":{\"__ndarray__\":\"nzVrwEblOUBayH42Ei9SQEQLpx8FSU9A4Irw8z/YOkDtbUhwf1xAQGczddHrIFFA9OUYH60/REAxyti5zrBNQO8Zij4JMipAvaxK6DVnSkBBeyPpiT9AQOtO2koP5UxA/ZLBxLC/UUCQelwZYmLaPwYQjfUcZEhAOkdasHpfQkCc+ppj6kAHQKiC7jfJTSxAwQ+GjWNIU0CTwB/tX7tSQMYQRg44IzVAG01nNv8iGUAoz+K/8c5TQK/b+tFwICFACfb/KDrWT0C5eWcsYQhYQC7I1Mm6plZA5Dvz7wuhNkAPa18GxTVYQExu0SKSE1dAqmlMhFszO0CgZNrwp/FXQE/ICmu+4yZAFwMAGZcmOUD/k/U2eytKQBSU/qhTIiJAoHWrUSMLMECSjd+C1uE6QPmd3BYkrEtArmJGjgs4VEA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]},\"y\":{\"__ndarray__\":\"WgwG8JtIT0BxG64B4UhXQGG8m6BH/1hAQddqeKYiSUDz2pLS90ZXQKy2Ju2b31VAsIJirzNRWEA78sP+xQ9VQJmCkFEPjUpAX3BEtTgFPkBXkPBdRvJTQH8BOafmdkNANnH3OealCEC3z7zqkelTQHYpKe2Vn1dA9oiiEodxFECPE1GlKMpTQIOdxofjI0xAqPZD9Cb4U0DSxx86EcdCQJddrWv5+zBAzmKTsgzDT0Cm+xUjxaMLQBuiWBm7zE1AsRcdt4wzN0AYFsotDNA1QDMD6g/8Z0FA3MF6dILxUkB9whe8E3JWQIF5/CX151NAsiGZFYS78D+UZByDliEhQM5rLA8sg0VA3EgeVN34VEBQU85Od7cjQLrVSySdVlRAGAoL+0m7T0D0viYXNCJQQDRhgYuJQ1BAAE9q2Cv6F0A=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[40]}},\"selected\":{\"id\":\"28020\"},\"selection_policy\":{\"id\":\"28019\"}},\"id\":\"27199\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"children\":[[{\"id\":\"27155\"},0,0],[{\"id\":\"27204\"},1,1]]},\"id\":\"28971\",\"type\":\"GridBox\"},{\"attributes\":{},\"id\":\"27207\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"27224\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"27168\"},\"dimension\":1,\"ticker\":null},\"id\":\"27171\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"28871\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"27169\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null},\"id\":\"27178\",\"type\":\"TapTool\"},{\"attributes\":{},\"id\":\"27223\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"27165\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"27233\"}},\"id\":\"27225\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"28872\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"27226\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"27222\",\"type\":\"CrosshairTool\"},{\"attributes\":{\"data_source\":{\"id\":\"27199\"},\"glyph\":{\"id\":\"27200\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"27201\"},\"selection_glyph\":null,\"view\":{\"id\":\"27203\"}},\"id\":\"27202\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"formatter\":{\"id\":\"28013\"},\"ticker\":{\"id\":\"27169\"}},\"id\":\"27168\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"27183\"}},\"id\":\"27180\",\"type\":\"BoxSelectTool\"},{\"attributes\":{},\"id\":\"27173\",\"type\":\"CrosshairTool\"},{\"attributes\":{},\"id\":\"27228\",\"type\":\"SaveTool\"},{\"attributes\":{\"below\":[{\"id\":\"27213\"}],\"center\":[{\"id\":\"27216\"},{\"id\":\"27220\"}],\"left\":[{\"id\":\"27217\"}],\"plot_height\":300,\"plot_width\":300,\"renderers\":[{\"id\":\"27251\"}],\"title\":{\"id\":\"28862\"},\"toolbar\":{\"id\":\"27236\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"27205\"},\"x_scale\":{\"id\":\"27209\"},\"y_range\":{\"id\":\"27207\"},\"y_scale\":{\"id\":\"27211\"}},\"id\":\"27204\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"callback\":null},\"id\":\"27227\",\"type\":\"TapTool\"},{\"attributes\":{\"overlay\":{\"id\":\"27235\"}},\"id\":\"27230\",\"type\":\"PolySelectTool\"},{\"attributes\":{},\"id\":\"27156\",\"type\":\"DataRange1d\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"27221\"},{\"id\":\"27222\"},{\"id\":\"27223\"},{\"id\":\"27224\"},{\"id\":\"27225\"},{\"id\":\"27226\"},{\"id\":\"27227\"},{\"id\":\"27228\"},{\"id\":\"27229\"},{\"id\":\"27230\"},{\"id\":\"27231\"}]},\"id\":\"27236\",\"type\":\"Toolbar\"},{\"attributes\":{\"overlay\":{\"id\":\"27234\"}},\"id\":\"27231\",\"type\":\"LassoSelectTool\"},{\"attributes\":{},\"id\":\"28865\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"fill_color\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":null},\"radius\":{\"field\":\"radius\",\"units\":\"data\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"27250\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"28863\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"27172\"},{\"id\":\"27173\"},{\"id\":\"27174\"},{\"id\":\"27175\"},{\"id\":\"27176\"},{\"id\":\"27177\"},{\"id\":\"27178\"},{\"id\":\"27179\"},{\"id\":\"27180\"},{\"id\":\"27181\"},{\"id\":\"27182\"}]},\"id\":\"27187\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"27162\",\"type\":\"LinearScale\"},{\"attributes\":{\"text\":\"\"},\"id\":\"28862\",\"type\":\"Title\"},{\"attributes\":{\"toolbars\":[{\"id\":\"27187\"},{\"id\":\"27236\"}],\"tools\":[{\"id\":\"27172\"},{\"id\":\"27173\"},{\"id\":\"27174\"},{\"id\":\"27175\"},{\"id\":\"27176\"},{\"id\":\"27177\"},{\"id\":\"27178\"},{\"id\":\"27179\"},{\"id\":\"27180\"},{\"id\":\"27181\"},{\"id\":\"27182\"},{\"id\":\"27221\"},{\"id\":\"27222\"},{\"id\":\"27223\"},{\"id\":\"27224\"},{\"id\":\"27225\"},{\"id\":\"27226\"},{\"id\":\"27227\"},{\"id\":\"27228\"},{\"id\":\"27229\"},{\"id\":\"27230\"},{\"id\":\"27231\"}]},\"id\":\"28972\",\"type\":\"ProxyToolbar\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"27183\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"27177\",\"type\":\"ResetTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"27184\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"27248\"}},\"id\":\"27252\",\"type\":\"CDSView\"},{\"attributes\":{\"data_source\":{\"id\":\"27248\"},\"glyph\":{\"id\":\"27249\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"27250\"},\"selection_glyph\":null,\"view\":{\"id\":\"27252\"}},\"id\":\"27251\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"28011\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"overlay\":{\"id\":\"27186\"}},\"id\":\"27181\",\"type\":\"PolySelectTool\"},{\"attributes\":{},\"id\":\"27175\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"28019\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text\":\"\"},\"id\":\"28010\",\"type\":\"Title\"},{\"attributes\":{\"overlay\":{\"id\":\"27185\"}},\"id\":\"27182\",\"type\":\"LassoSelectTool\"},{\"attributes\":{\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"27185\",\"type\":\"PolyAnnotation\"},{\"attributes\":{\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"27186\",\"type\":\"PolyAnnotation\"},{\"attributes\":{},\"id\":\"28013\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"28020\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"27235\",\"type\":\"PolyAnnotation\"},{\"attributes\":{\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"xs_units\":\"screen\",\"ys_units\":\"screen\"},\"id\":\"27234\",\"type\":\"PolyAnnotation\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"27232\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"27233\",\"type\":\"BoxAnnotation\"}],\"root_ids\":[\"28974\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"30207633-15e5-4e07-b567-7d4437614c14\",\"root_ids\":[\"28974\"],\"roots\":{\"28974\":\"b49642c7-46c3-44f9-945d-8450363be528\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "28974"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 设置数据\n",
    "N = 40\n",
    "# 随机点x坐标\n",
    "x1 = np.random.random(size = N)*100\n",
    "# 随机点y坐标\n",
    "y1 = np.random.random(size = N)*100 \n",
    "# 随机点x坐标\n",
    "x2 = np.random.random(size = N)*100\n",
    "# 随机点y坐标\n",
    "y2 = np.random.random(size = N)*100 \n",
    "# 随机半径\n",
    "r = np.random.random(size = N)*1.5 \n",
    "# 设置工具条\n",
    "TOOLS = \"hover, crosshair, pan ,wheel_zoom, box_zoom, reset, tap, save, box_select, poly_select, lasso_select\"\n",
    "\n",
    "# RGB颜色，画布1，绘图1\n",
    "colors = [\"#%02x%02x%02x\" %(int(r), int(g), 150) for r, g in zip(50+2*x,30+2*y)]\n",
    "\n",
    "# 设置画布大小\n",
    "p1 = figure(width = 300, height = 300, tools = TOOLS)\n",
    "# 设置画布参数 radius半径 fill_color填充颜色 fill_alpha填充色透明度 line_color图形边框\n",
    "p1.scatter(x1, y1, radius = r, fill_color = colors, fill_alpha = 0.6, line_color = None)\n",
    "\n",
    "# RGB颜色，画布2，绘图2\n",
    "colors = [ \"#%02x%02x%02x\"%(150, int(g), int(b)) for g, b in zip(50+2*x,30+2*y)]\n",
    "\n",
    "# 设置画布大小\n",
    "p2 = figure(width = 300, height = 300, tools = TOOLS)\n",
    "# 设置画布参数 radius半径 fill_color填充颜色 fill_alpha填充色透明度 line_color图形边框\n",
    "p2.scatter(x2, y2, radius = r, fill_color = colors, fill_alpha = 0.6, line_color = None)\n",
    "\n",
    "# 分别显示\n",
    "show(p1)\n",
    "show(p2)\n",
    "\n",
    "# 在同一个图片中同时展示 None表示跳过（空一个位置）\n",
    "from bokeh.layouts import gridplot\n",
    "grid = gridplot([[p1, None], [None, p2]])\n",
    "show(grid)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
